'use strict';
const db = uniCloud.database()
exports.main = (event, context) => {
	switch(event.type) {
		case 'get': 
			return getData()
	}
};

// get参数
async function getData() {
	let res = await db.collection('category').limit(7).get()
	return {
		status: 200,
		msg: "查询成功",
		data: res
	}
}
